/**
 * 
 */
package com.user.service;

import java.util.Collection;
import java.util.List;

/**
 * @author Administrator
 * 
 */
public class Page {

	private Integer pageNo = 1; 
	private Integer pageSize; 
	private Collection<?> content; 
	private Long totalRecNum; 
	private Integer startIndex; 
	private List<?> conditions;
	private UserQryHelper helper;
	private String userNo;
	private String userName;
	private String userStatus;
	private String colName;
	private String type;
	
	public String getColName() {
		return colName;
	}

	public void setColName(String colName) {
		this.colName = colName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getUserNo() {
		return userNo;
	}

	public void setUserNo(String userNo) {
		this.userNo = userNo;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(String userStatus) {
		this.userStatus = userStatus;
	}

	public UserQryHelper getHelper() {
		return helper;
	}

	public void setHelper(UserQryHelper helper) {
		this.helper = helper;
	}

	public Page(Integer pageNo)
	{
		super();
		this.pageNo=pageNo;
		this.pageSize=10;
	}
	
    public Page()
    {
    	this(1);
    }

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Collection<?> getContent() {
		return content;
	}

	public void setContent(Collection<?> content) {
		this.content = content;
	}

	public Long getTotalRecNum() {
		return totalRecNum;
	}

	public void setTotalRecNum(Long totalRecNum) {
		this.totalRecNum = totalRecNum;
	}

	public Integer getTotalPageNum() {
		return totalRecNum%pageSize!=0?(int)(totalRecNum/pageSize+1):(int)(totalRecNum/pageSize);
	}

	public Boolean getPrePage() {
		return pageNo>1;
	}

	public Boolean getNextPage() {
		return pageNo<this.getTotalPageNum();
	}

	public Long getStartIndex() {
		return 1L*pageSize*(pageNo-1)+1;
	}

	public Long getEndIndex() {
		return pageSize*pageNo>this.getTotalRecNum()?this.getTotalRecNum():pageSize*pageNo;
	}

	public List<?> getConditions() {
		return conditions;
	}

	public void setConditions(List<?> conditions) {
		this.conditions = conditions;
	}


}
